import request from '@/utils/request'

// 获取制程报检单
export function getIpqcInspectionInfo(id) {
    return request({
        url: `/api/Business/IpqcInspection/${id}`,
        method: 'GET'
    })
}

// 获取制程报检单列表
export function getIpqcInspectionList(data) {
    return request({
        url: `/api/Business/IpqcInspection`,
        method: 'GET',
        data
    })
}

// 添加制程报检单
export function createIpqcInspection(data) {
    return request({
        url: '/api/Business/IpqcInspection',
        method: 'POST',
        data
    })
}

// 更新制程报检单
export function updateIpqcInspection(data) {
    return request({
        url: `/api/Business/IpqcInspection/${data.id}`,
        method: 'PUT',
        data
    })
}

// 批量删除制程报检单
export function delIpqcInspectionBatch(data) {
    return request({
        url: `/api/Business/IpqcInspection/BatchRemove`,
        method: 'POST',
        data
    })
}
// 删除制程报检单
export function delIpqcInspection(id) {
    return request({
        url: `/api/Business/IpqcInspection/${id}`,
        method: 'DELETE'
    })
}
// 获取所有制程报检单
export function getIpqcInspectionAll() {
    return request({
        url: `/api/Business/IpqcInspection/All`,
        method: 'GET'
    })
}
// 导出制程报检单
export function exportData(data) {
    return request({
        url: `/api/Business/IpqcInspection/Actions/Export`,
        method: 'GET',
        data
    })
}
// 工厂建模信息下拉框
export function getArtrouteSelector(materialCode) {
    return request({
        url: '/api/BaseData/Artroute/Selector/' + (!!materialCode ? materialCode : 0),
        method: 'GET'
    })
}
// 确认制程报检单
export function confirmIpqcInspection(data) {
    return request({
        url: `/api/Business/IpqcInspection/confirm`,
        method: 'POST',
        data
    })
}
// 检验员看板
export function InspectorKanban() {
    return request({
        url: '/api/Business/IpqcInspection/InspectorKanban',
        method: 'GET'
    })
}
// 分配检验员
export function AssignInspector(data) {
    return request({
        url: '/api/Business/IpqcInspection/AssignInspector',
        method: 'PUT',
        data:data
    })
}